<?php

function loadLinks() {
    include_once('_class/DataBaseConnector.php');
    $db = new DataBaseConnector();
    $db->host = 'localhost';
    $db->username = 'pw_user';
    $db->password = 'pw';
    $db->database = 'pw';
    $db->connect();
    $selectedData = $db->selectData("articles", "title");

    if ($selectedData != NULL) {
        while ($row = mysql_fetch_assoc($selectedData)) {
            $title = $row['title'];
            echo "<li><a href=\"#\">$title</a></li>";
        }
    }
}

?>
